<?php
/* 
 * class.discountshow.php
 * 我的城市优惠信息
 * @author samuel
 * @date 2009-05-31
 */
include_once 'class.mycityBase.php';
class mycity_discountshow extends mycityBase {

    function  __construct($core) {
        parent::__construct();

        //参数处理
	    $this->id = $this->params['id'];
	    $this->user_id = $this->params['uid'] ? (int)$this->params['uid'] : 0;
	    $this->type = $this->params['type'] ? strtolower(trim($this->params['type'])) : 'all';
	    if(!$this->user_id){
		    $this->error = "用户ID不合法！";
		    $this->jumpError();
		    exit;
	    }
        $this->run();
    }

    function run(){
    	//WAP页面
	    //header("Content-type: text/vnd.wap.wml");
	    //TITLE
	    $page_title = "我的城市-优惠信息";
	    $content = "";
	    $content .= "<a href='".$_SERVER['PHP_SELF']."?type=".$this->type."&amp;uid=".$this->user_id."' alt='返回上级'>返回上级</a><br/><br/>";
	    $discount = $this->core->load('seller::sellerBase')->getSellerDiscountInfo($this->id);
	    $seller = $this->core->load('seller::sellerBase')->getSellerInfo($discount['SellerID']);
	    //var_dump($seller);
	    //var_dump($discount);
	    $content .= "";
	    $content .= $seller['SellerNameCN'] . "<br/>";
	    $content .= $discount['SellerMsg'] . "<br/>";
	    $content .= $discount['SellerMsgTime'] . "<br/><br/>";
	
	    $content .= "<a href='".$_SERVER['PHP_SELF']."?type=".$this->type."&amp;uid=".$this->user_id."' alt='返回上级'>返回上级</a><br/>";
	    $content .= "<a href='' alt='建议帮助'>建议帮助</a>";



	    $this->core->tpl->assign('content', $content);
	    $this->core->tpl->assign('page_title', $page_title);
	    $this->core->tpl->display('comm.wml');
    
    }
}


?>
